'use strict';
/**
 *  Created by deng on 16-5-20.
 */


angular.module('metalabPartnerApp').directive('metaBtnStatistic', ['MetaResources', function (MetaResources) {
    return {
        restrict: 'A',
        link: function (scope, element, attrs) {
            element.bind('click', function () {
                var tag = attrs['metaBtnStatistic'];
                MetaResources.statistic.userAction({}, {tag: tag}, function () {
                    console.log('clicked:' + tag);
                }, function (error) {
                    console.error(error);
                });
            });
        }
    }
}]);
